/*
 * NativeTestRegistry.h  0.4.0 / Nov 5, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
#ifndef NATIVETESTREGISTRY_H
#define NATIVETESTREGISTRY_H

#ifdef CUTE4J_TEST

#include "NativeTestFactory.h"

// NativeTestRegistry Class. ---------------------------------------------------

typedef QList<AbstractNativeTestFactory *> NativeTestFactories;
typedef QMap<QString, NativeTestFactories *> NativeTestModules;

/*!
 * \brief Native Test Registry.
 *
 * \author Slobodan Vrkacevic
 * \version 0.4.0
 */
class CUTE4J_EXPORT NativeTestRegistry
{
private:
  NativeTestRegistry();
  ~NativeTestRegistry();
public:
  static bool registerTestFactory(const QString &module,
                                  AbstractNativeTestFactory *testFactory);
  static jobjectArray getTestModules(JNIEnv *env);
  static jobjectArray getTestCases(JNIEnv *env, jstring testModule);
  static jlong createTestCase(JNIEnv *env, jstring testModule,
                              jstring testCase);
private:
  static NativeTestModules *modules; 
};

#endif // CUTE4J_TEST

#endif // NATIVETESTREGISTRY_H
